<?php include('header_test.php')?>
<?php
use \LaneWeChat\Core\Db;
use \LaneWeChat\Core\Ext;
include '/var/www/html/wx/wechat/core/ext.lib.php';
include '/var/www/html/wx/wechat/core/db.lib.php';
$accounts = \LaneWeChat\Core\Ext::AccountList($_SESSION['sid']);
?>
<title>微信公众号配置</title>
<style type="text/css">
    .submitBtn{ margin-top:20px;}
    #image-container{ background:rgba(0,0,0,0.4)}
    .uploadResult{ width:150px; position:relative; overflow:hidden; border:1px solid #ddd; background:#fff; border-radius:3px;}
    .uploadResult .con{ overflow:hidden; text-align:center; background:#eeeeee; border:4px solid #fff;}
    .uploadResult.loading .con{ padding:30px 15px;}
    .uploadResult.loading .con .text{ display:block; font-size:12px; color:#8b8b8b}
    .uploadResult.success .con{ height:120px;}
    .uploadResult.success .con img{ height:100%;}
    #uploadResultCon{ float:left}
    .uploadFailTip{ display:none; float:left; margin:15px 0 0 10px;}
    .uploadFailTip .p{ font-size:12px; line-height:1.1; color:red;}
    .uploadFailTip .p.p1{ font-size:14px; font-weight:bold}
    .uploadTip{ clear:both; width:100%; padding-top:5px;}
</style>
</head>
<body>
	<div class="navbar navbar-inverse navbar-static-top" role="navigation" style="position:static;">
		<div class="container-fluid">
			<ul class="nav navbar-nav">
				<li><a href="http://www.12301.cc"><i class="fa fa-reply-all"></i>返回系统</a></li>
			</ul>
		</div>
	</div>
	<div class="container-fluid">
		<div class="row">
            <?php include('leftbar_test.php')?>
            <div class="col-xs-12 col-sm-9 col-lg-10">
                <iframe src="about:blank" style="display: none;height: 0;width: 0;" id="_hide_frame_" name="_hide_frame_" frameborder="0"></iframe>
                <form class="form form-horizontal" action="ichat.php" method="post" target="_hide_frame_">
                <?php include 'acc_info.php';?>
                <ul id="tabNavWrap" class="nav nav-tabs">
                    <li class="tabNav active"><a href="javascript:;">群发功能</a></li>
                  <!--   <li class="tabNav"><a href="javascript:;">图文消息</a></li> -->
                </ul> 
                <div id="tabConWrap" class="clearfix">
                    <input name="action" type="hidden" value="SetKeyWord"/>
                    <input name="SpecialResponse" type="hidden" value="SpecialResponse"/>
                    <div style="display:none" class="panel panel-default tabPanel">
                        <div class="panel-heading"> 群发消息</div>
                        <div class="panel-body" style="position:relative">
                            <div class="form-group">
                                <label class="col-xs-12 col-sm-3 col-md-2 control-label">回复类型:</label>
                                <div id="welSwitchTabNavWrap" class="col-sm-9" style="position:relative">
                                    <label for="msg_type_1" class="radio-inline welTabNav">
                                        <input type="radio" name="msg_type" id="msg_type_1" value="TEXT" checked="checked">文本消息
                                    </label>
                                    <label for="msg_type_2" class="radio-inline welTabNav">
                                        <input type="radio" name="msg_type" id="msg_type_2" value="IMAGE">图文消息
                                    </label>
                                </div>
                            </div>
                            <div class="form-group welPanel" id="welPanel_text">
                                <label class="col-xs-12 col-sm-3 col-md-2 control-label">消息内容:</label>
                                <div class="col-sm-9">
                                    <textarea id="reply_msg_textarea" class="form-control" placeholder="粉丝关注此公众号时回复的消息" name="special[EVENT_SUBSCRIBE]"></textarea>
                                    <div class="help-block">
										1、对于认证订阅号，群发接口每天可成功调用1次，此次群发可选择发送给全部用户或某个分组；<br>
										2、对于认证服务号虽然开发者使用高级群发接口的每日调用限制为100次，但是用户每月只能接收4条，
										无论在公众平台网站上，还是使用接口群发，用户每月只能接收4条群发消息，多于4条的群发将对该用户发送失败；<br>
										3、具备微信支付权限的公众号，在使用群发接口上传、群发图文消息类型时，可使用标签加入外链；<br>
										4、开发者可以使用预览接口校对消息样式和排版，通过预览接口可发送编辑好的消息给指定用户校验效果。<br>
                                       
                                    </div>
                                </div>
                            </div>
                            <div class="welPanel" id="welPanel_img" style="display: none;">
                                <div class="form-group">
                                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">标题</label>
                                    <div class="col-sm-9">
                                        <input id="reply_welcome_imgtxt_tit" type="text" class="form-control" placeholder="添加图文消息的标题" name="title">
                                    </div>
                                </div>
								<div class="form-group">
                                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">作者</label>
                                    <div class="col-sm-9">
                                        <input id="reply_username_imgtxt_tit" type="text" class="form-control" placeholder="添加图文消息的作者" name="username">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">封面</label>
                                    <div class="col-sm-9">
                                        <div class="input-group ">
                                            <input id="showimgPathInp" type="text" name="thumb" value="" class="form-control">
                                        <span class="input-group-btn">
                                            <button id="openDialogBtn" class="btn btn-default" type="button">选择图片</button>
                                        </span>
                                        </div>
                                        <div id="uploadResultCon" class="input-group " style="margin-top:.5em;">
                                            <img src="http://www.12301.cc/wx_public/images/nopic.jpg" onerror="this.src='http://www.12301.cc/wx_public/images/nopic.jpg'; this.title='图片未找到.'" class="img-responsive img-thumbnail" width="150">
                                        </div>
                                        <div id="uploadFailTip" class="uploadFailTip">
                                            <p class="p p1">*上传图片失败</p>
                                            <p class="p p2">请确保所上传的图片大小不超过限制尺寸大小</p>
                                            <p class="p p3">由于上传图片受网络环境影响较，若上传失败，请重试几次</p>
                                        </div>
                                        <div class="uploadTip"><label>封面（大图片建议尺寸：360像素 * 200像素）</label></div>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">摘要</label>
                                    <div class="col-sm-9">
                                        <input type="text" id="reply_welcome_imgtxt_digest" class="form-control" placeholder="图文消息的摘要(简短描述)" name="digest">
                                        <div class="help-block">
                                            图文消息的摘要(简短描述)
                                        </div>
                                    </div>
                                </div>
								<div class="form-group">
                                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">正文</label>
                                    <div class="col-sm-9">
                                        <textarea id="content" name="content"></textarea>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">来源</label>
                                    <div class="col-sm-9">
                                        <input type="text" id="reply_welcome_imgtxt_ourl" class="form-control" value="http://" placeholder="图文消息的来源地址" name="url">
                                        <div class="help-block">
                                            点击消息跳转的地址
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <style type="text/css">
                             .menuLoadingLayer{ display:none; position:absolute; top:0; left:0; right:0; bottom:0; background:#8d8d8d; background:rgba(0,0,0,.6);}
                              .menuLoadingLayer .loading{ position:absolute; top:50%; left:50%; width:160px; height:60px; margin:-30px 0 0 -80px; text-align:center; line-height:60px; color:#fff; border:1px solid #979797; border-radius:2px; background:#cfcfcf; background:rgba(0,0,0,0.4);}
                             .menuLoadingLayer .loading .fa{ font-size:16px; margin-right:4px;}
                                #welcome_loading{ z-index:1000;}
                             </style>
                            <div id="welcome_loading" class="menuLoadingLayer"><div class="loading"><i class="fa fa-spinner fa-spin"></i>loading...</div></div>
                        </div>
                         <input id="submitBtn_welcome" name="submit" type="button" value="提交" class="submitBtn btn btn-primary col-lg-1">
                    </div>
                    
                </div>
                </form>
            </div>
		</div>

        <div id="image-container" class="modal fade in" tabindex="-1" role="dialog" aria-hidden="false">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button id="closeImgDialogBtn" type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                        <h3>请选择图片</h3>
                    </div>
                    <div class="modal-body">
                        <ul id="imgDialog-tabNavCon" class="nav nav-tabs" style="margin:auto -10px;padding:0 10px;">
                            <li class="imgnamespance"><a href="###" data-toggle="tab">网络图片</a></li>
                            <li class="active upload"><a href="###" data-toggle="tab">上传图片</a></li>
                        </ul>
                        <div id="imgDialog-tabPanCon" class="tab-content form-horizontal" style="padding:20px 0;">
                            <div class="tab-pane" id="image_browser">
                                <div class="form-group"><label class="col-xs-12 col-sm-2 control-label">图片地址</label>
                                    <div class="col-sm-10"><div class="input-group">
                                            <input id="imgUpload_space_inpFile" style="width:450px;" class="form-control" type="text" id="image_url" value="" placeholder="请输入图片URL">
                                            <!--<span class="input-group-btn"><button class="btn btn-default btn-browser" type="button">浏览图片空间</button></span>-->
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="tab-pane active" id="image_upload">
                                <iframe width="0" height="0" name="__image_file_uploader" style="display:none;"></iframe>
                                <form id="imgUpload_form" action="ichat.php" enctype="multipart/form-data" method="post" target="__image_file_uploader">
                                    <input name="action" value="UploadImage" type="hidden"/>
                                    <div class="form-group">
                                        <label class="col-xs-12 col-sm-2 control-label">上传图片</label>
                                        <div class="col-sm-10">
                                            <input type="file" name="image" id="imgUpload_inpFile" tabindex="-1" style="position: absolute; clip: rect(0px 0px 0px 0px);">
                                            <div class="bootstrap-filestyle input-group">
                                                <input id="imgUpload_fileVal" type="text" class="form-control " disabled>
                                                <span class="group-span-filestyle input-group-btn" tabindex="0">
                                                    <label for="imgUpload_inpFile" class="btn btn-default ">
                                                        <span class="fa fa-folder"></span> 上传图片</label>
                                                </span>
                                            </div>
                                            <input type="hidden" name="options" value=""></div>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                    <div class="modal-footer">
                        <button type="button" id="cancelImgDialogBtn" class="btn btn-default">取消</button>
                        <button type="button" id="submitImgUploadBtn" class="btn btn-primary">确认</button></div>
                </div>
            </div>
        </div>

	</div>
    <?php include('footer.php')?>
    <script type="text/javascript" src="http://www.12301.cc/wx_public/js/specialReply_msg.js"></script>
	<script type="text/javascript" src="http://www.12301.cc/ue_126/ueditor.all.min.js"></script>
	<script type="text/javascript" charset="utf-8" src="http://www.12301.cc/ue_126/ueditor_config_mini_wei.js"></script>
    <script>
	$(document).ready(function () {
         var ue = UE.getEditor('content');
		});
	</script>
</body>